import request from '@/utils/request'

// 新增任务
export function addTask(params) {
  return request({
    url: `/outwork/add`,
    method: 'post',
    data: params
  })
}

// 任务列表
export function getTaskList(params) {
  return request({
    url: `/outwork/list`,
    method: 'get',
    params
  })
}

// 送教任务详情
export function getTaskDetail(params) {
  return request({
    url: `/outwork/query/${params.id}`,
    method: 'get',
    params: {}
  })
}

// 删除送教任务
export function delTask(params) {
  return request({
    url: `/outwork/delete/${params.id}`,
    method: 'post',
    data: {}
  })
}

// 新增提报
export function addRecord(params) {
  return request({
    url: `/outwork/record/add`,
    method: 'post',
    data: params
  })
}

// 提报详情
export function recordDetail(params) {
  return request({
    url: `/outwork/record/query/${params.id}`,
    method: 'get',
    params: {}
  })
}

// 删除提报
export function delRecord(params) {
  return request({
    url: `/outwork/record/delete/${params.id}`,
    method: 'post',
    data: {}
  })
}

// 审核提报
export function verifyRecord(params) {
  return request({
    url: `/outwork/record/approve/${params.id}`,
    method: 'post',
    data: {}
  })
}

// 送教记录列表
export function getSendRecordList(params) {
  return request({
    url: `/outwork/record/listOutworkRecord`,
    method: 'get',
    params
  })
}

// 统计学生  我的工作台
export function getStaticStudent(params) {
  return request({
    url: `/outwork/countStudent`,
    method: 'get',
    params
  })
}

// 统计任务 我的工作台
export function getStaticTask(params) {
  return request({
    url: `/outwork/countOutwork`,
    method: 'get',
    params
  })
}

// 统计数量 我的工作台
export function getStaticNum(params) {
  return request({
    url: `/outwork/countOutworkNum`,
    method: 'get',
    params
  })
}

// 送教提报审核列表
export function getVerifyList(params) {
  return request({
    url: `/outwork/record/pageOutworkRecord`,
    method: 'get',
    params
  })
}

// 送教统计报表
export function sendStatic(params) {
  return request({
    url: `/outwork/pageScoreCount`,
    method: 'get',
    params
  })
}

// 任务评分
export function rankTask(params) {
  return request({
    url: `/outwork/score`,
    method: 'post',
    data: params
  })
}
